package com.fenyin.samples.study.parttern.struct.flyweight.example1;  

/**
 *@Title:  复合享元模式
 *<p>PhoneMessage：具体享元角色</p>
 *@Author:fengzhichao  
 *@Since:2012-9-29  
 *@Version:1.1.0
 */
public class PhoneMessage implements Message {
	
	/**短信标识*/
	private int id;
	
	/**短信内容*/
	private String content;
	
	public PhoneMessage(int id,String content){
		this.id = id;
		this.content = content;
	}
	
	public void display(String recvPerson) {
		StringBuffer data = new StringBuffer();
		data.append("收信人     ：").append(recvPerson).append("\t\n");
		data.append("短信内容：").append(content);
		System.out.println(data.toString());
	}

}
